package org.ala.tiktools_clickhouse_generator.generator.fields;

import java.util.HashSet;
import java.util.Set;

import org.ala.tiktools_clickhouse_generator.config.ConfigInfo.Author;
import org.ala.tiktools_clickhouse_generator.generator.AbstractInfo;
import org.ala.tiktools_clickhouse_generator.generator.entity.EntityInfo;
import org.ala.tiktools_clickhouse_generator.table.TableInfo;
import org.ala.tiktools_clickhouse_generator.tools.NameTools;
import org.ala.tiktools_clickhouse_generator.tools.TimeTools;

/**
 *
 *	@author ala
 *	@date 2025年6月9日
 */
public class FieldsInfo extends AbstractInfo {
	
	
	/**
	 * 	类名，包名，创建时间
	 */
	protected String className, pkg, createTime;
	/**
	 * 	引用
	 */
	protected Set<String> imports;
	/**
	 * 实体信息
	 */
	protected EntityInfo ei;
	

	public FieldsInfo(TableInfo tableInfo, Author author, EntityInfo ei) {
		super(tableInfo, author);
		
		pkg = ei.getPkg();
		className = NameTools.upFirst(NameTools.hump(tableInfo.getName())) + "Fields";
		createTime = TimeTools.formatNow();
		
		this.ei = ei;
		
		imports = new HashSet<>();
		imports.add("org.ala.clickhouse.xml.fields.CKField");
	}


	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public String getPkg() {
		return pkg;
	}
	public void setPkg(String pkg) {
		this.pkg = pkg;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	public Set<String> getImports() {
		return imports;
	}
	public void setImports(Set<String> imports) {
		this.imports = imports;
	}
	public EntityInfo getEi() {
		return ei;
	}
	public void setEi(EntityInfo ei) {
		this.ei = ei;
	}
}
